package com.jingdianjichi.wx.handler;

public enum WxChatMsgTypeEnum {

    // 订阅
    SUBSCRIBE("event.subscribe","用户订阅事件"),

    // 接收消息
    TEXT_MSG("text","接收用户文本信息");

    private String msgType;

    private String desc;

    WxChatMsgTypeEnum(String msgType, String desc){
        this.msgType =msgType;
        this.desc =desc;
    }

    public static WxChatMsgTypeEnum getByMsgType(String msgType){
        for(WxChatMsgTypeEnum wxChatMsgTypeEnum: WxChatMsgTypeEnum.values()){
            if(wxChatMsgTypeEnum.msgType.equals(msgType)){
                return wxChatMsgTypeEnum;
            }
        }
        return null;
    }



}
